using System.Windows;

namespace GraphSharp.Algorithms.OverlapRemoval {
    public class RectangleWrapper<TObject>
        where TObject : class {
        private readonly TObject id;
        public TObject Id {
            get { return id; }
        }

        public Rect Rectangle;

        public RectangleWrapper(Rect rectangle, TObject id) {
            Rectangle = rectangle;
            this.id = id;
        }

        public double CenterX {
            get { return Rectangle.Left + Rectangle.Width / 2; }
        }

        public double CenterY {
            get { return Rectangle.Top + Rectangle.Height / 2; }
        }

        public Point Center {
            get { return new Point(CenterX, CenterY); }
        }
    }
}